<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@page import="com.ch7.model.BlogInfo"%>
<%@page import="com.ch7.dal.Blog"%>
<%@page import="com.ch7.common.*"%>
<%@page import="com.ch7.dal.Class"%>
<%@page import="com.ch7.model.ClassInfo"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>博文分類查找</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

<%
	Blog blog = new Blog();
	int classId = DataConverter.toInt(request.getParameter("classId"));
	List<BlogInfo> list = blog.getListByClassId(classId);
	Class cls = new Class();
	List<ClassInfo> clist = cls.getList();
%>
<div class="header">
<style>
.header{ background:url(Image/2.jpg) no-repeat left top; height:618px;}}
</style>

</div>
<div id="content">
	<%
		for (BlogInfo info : list) {
	%>
	<div class="post">
		<h1 class="title">
			<a href="blog-information.jsp?id=<%=info.getId()%>"><%=info.getTitle()%></a>
		</h1>
		<p class="byline">
			<small><%=info.getCreatedtime()%></small>
		</p>
		<div class="entry">
			<p><%=Utility.Substring(DataValidator.removeHtml(info.getContext()), 300)%></p>
		</div>
		<P class="meta">
			<a href="#" class="more">分类：<%=info.getClassName()%></a>
			&nbsp;&nbsp;&nbsp;<a href="#" class="more">詳情</a>&nbsp;&nbsp;&nbsp;
		</P>
	</div>
	<%
		}
	%>
</div>
</head>


<body background="Image/timg.jpg" width=100% height=100%>

</body>
</html>
